﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace Controller
{
    public class OptionBO
    {
        private OptionDAO _opDAO;
        public OptionDAO opDAO
        {
            get
            {
                if (_opDAO == null)
                    _opDAO = FactoryModelDAO.CurrentFA.CreateOptionDAOInstance();
                return _opDAO;
            }
        }


        /// <summary>
        /// 获取项目路径（默认为程序的Project文件夹）
        /// </summary>
        /// <param name="IsDefault"></param>
        /// <returns></returns>
        public string GetProjectPath()
        {
            try
            {
              return  opDAO.GetProjectPath();
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }

        /// <summary>
        /// 设置项目路径
        /// </summary>
        /// <param name="path"></param>
        public void SetProjectPath(string path)
        {
            try
            {
                opDAO.SetProjectPath(path);
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
    }
}
